POV-Ray : Newsgroups : povray.general : Illustrating a point ray-trace path : Re: Illustrating a point ray-trace path Server Time
30 Jul 2024 14:22:51 EDT (-0400)
  Re: Illustrating a point ray-trace path  
From: alphaQuad
Date: 17 Dec 2008 16:35:00
Message: <web.49496f6ed2fe8b867d75e9b90@news.povray.org>
"Catseye" <jpf### [at] comcastnet> wrote:
> Is there a "tool" in PovRay I can activate to easily display the trace of
> the light path from a single point on an object as reflected between 2
> mirrors?
>
> In lieu of that, can any one send or direct me to code for a nice "laser"
> render that can be inserted into my code to show the effects?
>
> Jim

 I guess its up to me. a "nice" laser or a crappy one?

This is one of those cases where me and Google get together for answers ...
more and more this should be the case since 2008.


Google:
laser povray alphaquad

gets you:
http://news.povray.org/povray.binaries.scene-files/thread/%3Cweb.479df15fa8892dc837391bc50@news.povray.org%3E/

http://news.povray.org/povray.binaries.images/thread/%3Cweb.488108769ae7ea535083b53c0%40news.povray.org%3E/

From LegoMan and Cousin Ricky

#declare lightsaber = material {
texture
       {  pigment { rgbf 1 }
          finish
          {  reflection { 0 0.5 fresnel } conserve_energy
             specular 1 roughness 0.01
          }
          #if (1) normal { n_Sea } #end
       }
       interior
       {  #if (0) ior 1.5 #end
          media
          {
             emission <.1, .1, 1>
             #if (1) scattering { 3, <0.004, 0.012, 0.020> } #end
             method 3
             intervals 1
             samples 3, 3
             aa_level 2
          }
       }
}


      object {
        cylinder { 0, 15*y, 1.5 }
        hollow //material { seawater }
        material { lightsaber }
        translate y*9.5
        rotate x*-15 translate z*-3.0 rotate x*handxrot
        translate <-2.6,-8,-4.0> rotate rarmrot translate <-shoulder,14,0>
      }




planetarium laser and code from Rune's particles

#include "hash.inc"

// ************************* WarBird *******************************
#macro laser(A,B,rad,C)
   #local p_id = 0.1;
   #local glow_state = 0.001;  // fader
   #local glow_colorturb = <0.3,0.3,0.3>; //magnitude Randomness to color
   #local ColorJitter =

(<Hash2(p_id,1),Hash2(p_id,2),Hash2(p_id,3)>-<0.5,0.5,0.5>)*glow_colorturb;
   #local Color =
      (
         C
         *(1+ColorJitter)       // Randomness to color
         *(1.001-glow_state)*20    // fader
      );

   #local ColorM = max(Color.x,max(Color.y,Color.z));   // highest RGB
   #local Color = Color/2;

      cylinder { 0,y*vlength(A-B),rad
      //sphere { 0, 1

      hollow no_shadow
      pigment {rgbf 1}
      finish {ambient 1 diffuse 0}
      interior {
         media {
            emission Color            // color
            intervals 10              // default 10
            ratio 0.9//default 0.9 distributes intervals-lit and unlit areas
            samples 4,8       // default 1,1
            variance 1.0/128
            confidence 0.9
            method 2                  //1,2,3adaptive
            density {
               //spherical cylindrical
               cylindrical
               density_map {
                  [0.0, rgb 0       ]
                  [0.6, rgb Color   ]
                  [1.0, rgb 2*ColorM]
               }
            }
         }
      }
      rotate <-declination(A-B)+90,0,0>
      rotate <0,-rascension(A-B)+90,0>
      translate B
    }

#end
laser(hp, Target,.2*Scale,<0,1,0>)



cylindrical light in media:
#declare laser =
light_source {
  <0,0,0>,
  rgb 1
  cylinder
  point_at <-1,0,0>
  radius 0.05
  falloff 0.1
  tightness 0
  #if (Use_Photons)
    photons {reflection on refraction on}
  #end
  }


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.